package cn.txun.springboot61.mapper;

import cn.txun.springboot61.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper {
    @Select("select id,username,password,nickname from user where username=#{username}")
    User selectByName(String username);

    @Insert("insert into user values (null,#{username},#{password},#{nickname})")
    int insert(User user);
}
